cmake_minimum_required (VERSION 3.10.2)
set (TOP_PROJECT_NAME "mytest")
project (${TOP_PROJECT_NAME} VERSION 1.2.3.4 DESCRIPTION "This is top-level project" LANGUAGES "CXX" "C" "ASM")
#project (mytest "CXX")
cmake_policy (SET CMP0048 NEW)
message (">>> top PROJECT_NAME: ${PROJECT_NAME}")
message (">>> top CMAKE_PROJECT_NAME: ${CMAKE_PROJECT_NAME}")
message (">>> top PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
message (">>> top <PROJECT_NAME>_SOURCE_DIR: ${${TOP_PROJECT_NAME}_SOURCE_DIR}")
message (">>> top PROJECT_BINARY_DIR: ${PROJECT_BINARY_DIR}")
message (">>> top <PROJECT_NAME>_BINARY_DIR: ${${TOP_PROJECT_NAME}_BINARY_DIR}")
message (">>> top PROJECT_VERSION: ${PROJECT_VERSION}")
message (">>> top CMAKE_PROJECT_VERSION: ${CMAKE_PROJECT_VERSION}")
message (">>> top PROJECT_VERSION_MAJOR: ${PROJECT_VERSION_MAJOR}")
message (">>> top PROJECT_VERSION_MINOR: ${PROJECT_VERSION_MINOR}")
message (">>> top PROJECT_VERSION_PATCH: ${PROJECT_VERSION_PATCH}")
message (">>> top PROJECT_VERSION_TWEAK: ${PROJECT_VERSION_TWEAK}")
message (">>> top PROJECT_DESCRIPTION: ${PROJECT_DESCRIPTION}")
message (">>> top CMAKE_PROJECT_DESCRIPTION: ${CMAKE_PROJECT_DESCRIPTION}")
add_subdirectory (sub_project)
project (mytest1 VERSION 4.4.4.4)
message (">>> top CMAKE_PROJECT_NAME: ${CMAKE_PROJECT_NAME}")
